package com.zhongxiangspace.service;

import com.zhongxiangspace.entity.Advert;
import com.zhongxiangspace.entity.AdvertSite;
import com.zhongxiangspace.entity.QueryAnalyzer;

import java.util.List;
import java.util.Map;

/**
 * 广告
 */
public interface AdvertService {
    /**
     * 查询广告位置
     * @return
     */
    List<AdvertSite> queryAllAdvertSite();

    /**
     * 插入广告
     * @param advert
     * @return
     */
    boolean insert(Advert advert);

    /**
     * 查询广告
     * @param queryAnalyzer 条件
     * @return
     */
    List<Map<String,Object>> queryAdvert(QueryAnalyzer queryAnalyzer);

    /**
     * 查询单条
     * @param id
     * @return
     */
    Advert queryOne(Integer id);

    /**
     * 更新上下线
     * @param advert
     * @return
     */
    boolean updataStatusCode(Advert advert);

    /**
     * 逻辑删除
     * @param id
     * @return
     */
    boolean delete(Integer id);

    /**
     * 更新广告
     * @param advert
     * @return
     */
    boolean updata(Advert advert);
}
